package com.jdd.fintech.morse.plugin.polymorphic;

/**
 * @description: 多态执行类
 * @credit: 2022-03-29 14:46
 * @author: fengcheng
 **/
public class PolymorphicExposeExecute {

    public static String execute(PolymorphicExposeParentClass parentClass) {
        String execute = parentClass.execute();
        System.out.println("execute: " + execute);
        return null;
    }

    public static void main(String[] args) {
        PolymorphicExposeParentClass exposeParentClass = new PolymorphicExposeParentClass();
        PolymorphicExposeParentClass exposeSubOneClass = new PolymorphicExposeSubOneClass();
        PolymorphicExposeParentClass exposeSubTowClass = new PolymorphicExposeSubTowClass();
        execute(exposeParentClass);
        execute(exposeSubOneClass);
        execute(exposeSubTowClass);

    }
}
